home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / workspace.704 < prev    next >
Text File  |  1992-02-06  |  7KB  |  135 lines

  1. {\rtf0\ansi{\fonttbl\f3\fnil Times-Roman;\f1\fmodern Courier;\f0\fswiss Helvetica;}
  2. \paperw11440
  3. \paperh11400
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\b0\i0\ul0\fs28 launch applications  fonts \
  8.     \
  9.  
  10. \fi-400\li400 Q:  I'm unable to launch apps.  What could be happening?  (I've logged in to a machine running Release 2 and someone who has used this machine recently installed lots of fonts in their home folder.)\
  11.  
  12. \i\fi0\li0     \
  13.  
  14. \i0\fi-400\li400 A:  There is a bug in 2.0 and 2.1 which may occur when a user logs into a machine where the previous user had many fonts in Library/Fonts in their home folder.  When that previous user logged out of the machine, the cached AFM data for those fonts were de-allocated, but other memory was erroneously de-allocated as well.  (This problem doesn't arise when the machine is only used by one person.)\
  15. \
  16.  
  17. \fi0 When this problem occurs, you may be unable to launch apps as described above.  To determine if this really is the problem, do two things:\
  18. \
  19. First, look at the Workspace console for messages like:\
  20. \
  21.  
  22. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs24\fi440 Mar 13 17:24:35 machineName pbs: msg_send error: -101, with msg_id = xxx\
  23.  
  24. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\fs28\li400 \
  25. where xxx is some number.  When this bug occurs, pbs (the pasteboard server) will either die or you will get this message.  If you are a UNIX expert and wish to determine if the pasteboard server has died, do the following from a Terminal window:\
  26.  
  27. \li0 \
  28.  
  29. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs24\fi440 % ps -aux | fgrep pbs\
  30.  
  31. \fc0 joe_user   721   4.5  2.5 1.39M  208K p1 S     0:00 fgrep pbs\
  32. root       139   0.0  1.7 1.45M  136K ?  SW    0:03 /usr/etc/pbs\
  33.  
  34. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 \
  35.  
  36. \f3\fs28\li400 If the process "/usr/etc/pbs" shown above is 
  37. \i missing
  38. \i0 , then the pasteboard daemon is not running—a symptom of this problem.  \
  39. \
  40.  
  41. \i Note:  This is a difficult bug to characterize as it involves several factors:  the number of fonts involved, the users involved, whether the fonts are accessed over NFS, whether the fonts have screen fonts (since this means there are more AFMs) and what sort of data the AFM files have (some AFM s have more strings than others).  
  42. \b Given this caveat:  a user with twelve or so fonts will probably not see this problem whereas a user with 500 fonts installed in his home Font folder is more likely to experience it.
  43. \b0   \
  44. \
  45. Also note that if only one user uses a machine they will NOT see this problem even when logging in and out repeatedly.  \
  46. \
  47.  
  48. \b\i0\li0 Workaround
  49. \b0 \
  50. You have four possible solutions:\
  51. \
  52.  
  53. \fi-320\li320 1) Move the fonts to /LocalLibrary.  This font folder is available to every user who logs on and the erroneous de-allocation will not occur.  Note that there may be font licensing issues which prevent this approach on networked systems.\
  54.  
  55. \fi0\li0 \
  56.  
  57. \fi-320\li320 2) Remove the .afmcache file located in Library/Fonts on the offending users account.  When the contents of the Font folder are modified (either added to or deleted from), the next application that needs to use a font will detect that the folder has been modified and will put up an alert panel saying:\
  58. \
  59.  
  60. \fi620 Incorporating information about new fonts.\
  61. Please wait (this may take up to 60 seconds).\
  62.  
  63. \fi-320 \
  64.  
  65. \fi0 This will create a new copy of .afmcache in the Font folder.  [Remember, that since the name of this file is preceded by a '.', you will not ordinarily see it unless you have "UNIX expert" selected in Preferences or unless you type '.' in the Workspace while that folder is selected.]\
  66. \
  67. So, after you have added or removed fonts to your home Font folder, do the following:\
  68. \
  69.  
  70. \fi-320\li1280 a) If WriteNow is running, quit WriteNow.  Launch WriteNow.  You should get the alert mentioned above saying the new fonts are being incorporated.  This will create the .afmcache file in your home Font folder.\
  71. \
  72. b) When the panel goes away, use the File Browser to select Library/Fonts in your Home folder.  Choose Finder... [command f] from the Tools menu.  Type ".afmcache" and hit the Find button.  [Make sure that you spell this correctly.]  The .afmcache file will appear at the end of the icon path.  If you are installing hundreds of fonts, the file may not be created yet.  After a few minutes, you should be able to find the file.\
  73.  
  74. \li320 \
  75.  
  76. \li1280 c) Drag the file to the Recycler.  Each time you modify the contents of the ~/Library/Fonts folder this process will need to be repeated in order to avoid the bug.\
  77. \
  78.  
  79. \b\fi-820\li1140 Note:  
  80. \b0 The disadvantage to this solution is that the next time you modify the contents of your Font folder this file will be re-generated.  In that case, these steps must be repeated.\
  81.  
  82. \fi-320\li320 \
  83. 3) An automated method for removing the .afmcache can also be used, but requires root privileges to configure.  This method employs the logout hook of the loginwindow and the instructions assume some knowledge of UNIX.  For steps a & b you must be root:\
  84. \
  85.  
  86. \li1280 a) Make a shell script with the following contents and pick a place to put it (perhaps in /usr/lib/NextStep/FixFontBug).    \
  87. \
  88.  
  89. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs24\fi1640\fc0 #!/bin/csh -f\
  90. rm ~$1/Library/Fonts/.afmcache\
  91.  
  92. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\fs28 \
  93.  
  94. \li960 The permissions on this file should be 4755 and the owner should be root.  [Allowing users to write this file would open up a security hole.] To ensure that this file has the correct permissions use the chmod command in a Terminal window:\
  95.  
  96. \fi-320\li1280 \
  97.  
  98. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs24\fi1640 # chmod 4755 /usr/lib/NextStep/FixFontBug\
  99.  
  100. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\fs28\fi-320\li1280     \
  101. b) Use the dwrite command in a Terminal window:\
  102. \
  103.  
  104. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs24\fi1640\fc0 # dwrite loginwindow LogoutHook /usr/lib/NextStep/FixFontBug\
  105.  
  106. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\fs28 \
  107.  
  108. \b\li400 The advantages of this solution are:\
  109.  
  110. \b0 \
  111. • It fixes the problem for the whole machine instead of for one user.\
  112. \
  113. • The solution doesn't need to be re-applied whenever you install or remove fonts.\
  114. \
  115. • You can set it and forget it.\
  116. \
  117.  
  118. \b The disadvantage of this solution is:\
  119.  
  120. \b0 \
  121.  
  122. \fi-200\li600 • It can open up a potential security hole.  Even with the restricted write permissions in step a above, there exists a small risk.  If it is important that you take no unnecessary security risks, choose an alternate solution.\
  123.  
  124. \fi0\li400 \
  125.  
  126. \fi-320\li320 4) Reboot the machine prior to logging in. [Or have the user with many fonts power the system down each time he logs out if it is likely that another user may log in to that machine.]\
  127.  
  128. \fi0\li0 \
  129. QA704\
  130. \
  131. Not valid for 1.0\
  132. Valid for 2.0\
  133. \
  134.  
  135.